<?php

use Illuminate\Database\Seeder;

class MenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \App\Models\Menu::create([
            'name' => '首页',
            'icon' => 'home',
            'slug' => 'admin.home.index',
            'url' => 'admin/home/index',
            'hightlight_url' => 'admin/index',
            'parent_id' => 0,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);
        \App\Models\Menu::create([
            'name' => '系统管理',
            'icon' => 'settings',
            'slug' => 'admin.system.index',
            'url' => 'admin/system/index',
            'hightlight_url' => 'admin/menu*,admin/permission*,admin/role*',
            'parent_id' => 0,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);

        \App\Models\Menu::create([
            'name' => '菜单管理',
            'icon' => 'menu',
            'slug' => 'admin.menu.index',
            'url' => 'admin/menu/index',
            'hightlight_url' => 'admin/menu*',
            'parent_id' => 2,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);

        $permission = \App\Models\Menu::create([
            'name' => '权限管理',
            'icon' => 'lock',
            'slug' => 'admin.permission.index',
            'url' => 'admin/permission/index',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => 2,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);

        \App\Models\Menu::create([
            'name' => '添加权限',
            'icon' => '',
            'slug' => 'admin.permission.create',
            'url' => 'admin/permission/create',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => $permission->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '保存权限',
            'icon' => '',
            'slug' => 'admin.permission.store',
            'url' => 'admin/permission/store',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => $permission->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '修改权限',
            'icon' => '',
            'slug' => 'admin.permission.edit',
            'url' => 'admin/permission/edit/',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => $permission->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '更新权限',
            'icon' => '',
            'slug' => 'admin.permission.update',
            'url' => 'admin/permission/update',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => $permission->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '删除权限',
            'icon' => '',
            'slug' => 'admin.permission.destroy',
            'url' => 'admin/permission/destroy',
            'hightlight_url' => 'admin/permission*',
            'parent_id' => $permission->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);



        $role = \App\Models\Menu::create([
            'name' => '角色管理',
            'icon' => '',
            'slug' => 'admin.role.index',
            'url' => 'admin/role/destroy',
            'hightlight_url' => 'admin/role*',
            'parent_id' => 2,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);

        \App\Models\Menu::create([
            'name' => '添加权限',
            'icon' => '',
            'slug' => 'admin.role.create',
            'url' => 'admin/role/create',
            'hightlight_url' => 'admin/role*',
            'parent_id' => $role->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 1
        ]);
        \App\Models\Menu::create([
            'name' => '保存权限',
            'icon' => '',
            'slug' => 'admin.role.store',
            'url' => 'admin/role/store',
            'hightlight_url' => 'admin/role*',
            'parent_id' => $role->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '修改权限',
            'icon' => '',
            'slug' => 'admin.role.edit',
            'url' => 'admin/role/edit/',
            'hightlight_url' => 'admin/role*',
            'parent_id' => $role->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '更新权限',
            'icon' => '',
            'slug' => 'admin.role.update',
            'url' => 'admin/role/update',
            'hightlight_url' => 'admin/role*',
            'parent_id' => $role->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);
        \App\Models\Menu::create([
            'name' => '删除权限',
            'icon' => '',
            'slug' => 'admin.role.destroy',
            'url' => 'admin/role/destroy',
            'hightlight_url' => 'admin/role*',
            'parent_id' => $role->id,
            'is_system' => true,
            'status' => 1,
            'is_show' => 0
        ]);








    }
}
